<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>类</title>
</head>
<body>
    

    <script>
        
        {


            class Animal {
                constructor(name) {
                    this.name = name;
                }
            }

            class Cat extends Animal {
  
                constructor(name) {
                    super(name);
                }

                say() {
                    return ('hello,' + this.name + '!');
                }

            }

            let kitty = new Cat('ketty');

            console.log(kitty.say());
        }
        
    </script>
</body>
</html>